//
//  BodyDetailModel.m
//  PPScaleDemo
//
//  Created by 彭思远 on 2021/11/1.
//

#import "BodyDetailModel.h"

@interface BodyDetailModel ()
@end

@implementation BodyDetailModel


- (instancetype)initWithPPBodyMeasureDetailModel:(PPBodyMeasureDetailModel *)model{
    self = [super init];
    if (self) {
        NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"PPResource" ofType:@"bundle"]];
//        NSString *language = [NSLocale preferredLanguages].firstObject;
        NSBundle *languageBundle = [NSBundle bundleWithPath:[bundle pathForResource:@"zh" ofType:@"lproj"]];
        self.level =  [languageBundle localizedStringForKey:model.standStr value:nil table:nil];
        switch (model.bodyParam) {
    #pragma mark -- BMI
            case PPBodyParam_BMI:
            {
                self.code = @"flagBM";
            }
                break;
    #pragma mark -- Weight 体重
            case PPBodyParam_Weight:
            {
                self.code = @"flagWeightKg";

            }
                break;
    #pragma mark -- BodyFat 脂肪
            case PPBodyParam_BodyFat:
            {
                self.code = @"flagBodyfatPercentage";

            }
                break;
    #pragma mark -- Bone 骨量
            case PPBodyParam_Bone:
            {
                self.code = @"flagBoneKg";

            }
                break;
    #pragma mark -- VisFat 内脏脂肪
            case PPBodyParam_VisFat:
            {
                self.code = @"flagVFAL";
                
            }
                break;
    #pragma mark -- BMR
            case PPBodyParam_BMR:
            {
                self.code = @"flagBMR";

            }
                break;
    #pragma mark -- Water 水分
            case PPBodyParam_Water:
            {
                self.code = @"flagWaterPercentage";

            }
                break;
    #pragma mark -- Muscle 肌肉
            case PPBodyParam_Mus:
            {
                self.code = @"flagMuscleKg";

            }
                break;

    #pragma mark -- BodyAge 身体年龄
        case PPBodyParam_BodyAge:
        {
            self.code = @"flagBodyAge";

        }
                break;
                
    #pragma mark -- ProteinPercentage 蛋白质
            case PPBodyParam_proteinPercentage:
            {
                self.code = @"flagProteinPercentage";

            }
                break;
    #pragma mark -- FatGrade 肥胖等级
            case PPBodyParam_FatGrade:
            {
                self.code = @"flagFatGrade";

            }
                break;
    #pragma mark -- BodySubcutaneousFat 皮下脂肪
            case PPBodyParam_BodySubcutaneousFat:
            {
                self.code = @"flagVFPercentage";

            }
                break;
    #pragma mark -- BodyLBW 去脂体重
            case PPBodyParam_BodyLBW:
            {
                self.code = @"flagLoseFatWeightKg";
        
            }
                break;
    #pragma mark -- BodyScore 身体得分
            case PPBodyParam_BodyScore:
            {
                self.code = @"flagBodyScore";

            }
                break;
    #pragma mark -- physicalAgeValue 身体年龄
            case PPBodyParam_physicalAgeValue:
            {
                self.code = @"flagBodyAge";
            
            }
                break;
    #pragma mark -- BodyType 身体类型
            case PPBodyParam_BodyType:
            {
                self.code = @"flagBodyType";

            }
                break;

    #pragma mark -- Bmdj 闭目单脚
            case PPBodyParam_Bmdj:
            {
                self.code = @"flagBMDJ";

            }
                break;
    #pragma mark -- heart 心律
            case PPBodyParam_heart:{
                self.code = @"flagHeart";

            }
                break;

            default:
                break;
        }
        
    }
    return self;
}


@end
